using UnityEngine;
using QFramework;
using ProjectSurvivor;
using QAssetBundle;

namespace QFrameworkSurvivor
{
	public partial class Exp : PowerUp
    {
        protected override Collider2D Collider2D =>SelfCollider2D;

        protected override void Execute()
        {
            AudioKit.PlaySound(Sfx.EXP);
            Global.Exp.Value++;
            this.DestroyGameObjGracefully();
        }

        private void OnTriggerEnter2D(Collider2D other)
        {
            if (other.GetComponent<CollectableArea>())
            {
                FlyingToPlayer=true;
            }
        }
    }
}
